// This file is part of Acala.

// Copyright (C) 2020-2025 Acala Foundation.
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

//! Autogenerated weights for module_incentives
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 35.0.1
//! DATE: 2024-04-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `ip-172-31-41-141`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("acala-dev"), DB CACHE: 1024

// Executed Command:
// target/production/acala
// benchmark
// pallet
// --chain=acala-dev
// --steps=50
// --repeat=20
// --pallet=*
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --template=./templates/runtime-weight-template.hbs
// --output=./runtime/acala/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;

/// Weight functions for module_incentives.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> module_incentives::WeightInfo for WeightInfo<T> {
	// Storage: `EmergencyShutdown::IsShutdown` (r:1 w:0)
	// Proof: `EmergencyShutdown::IsShutdown` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
	// Storage: `Rewards::PoolInfos` (r:5 w:0)
	// Proof: `Rewards::PoolInfos` (`max_values`: None, `max_size`: None, mode: `Measured`)
	// Storage: `Incentives::IncentiveRewardAmounts` (r:8 w:0)
	// Proof: `Incentives::IncentiveRewardAmounts` (`max_values`: None, `max_size`: None, mode: `Measured`)
	// Storage: `System::Account` (r:1 w:0)
	// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
	/// The range of component `c` is `[0, 4]`.
	fn on_initialize(c: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `1301 + c * (206 ±0)`
		//  Estimated: `4788 + c * (5029 ±5)`
		// Minimum execution time: 8_714 nanoseconds.
		Weight::from_parts(12_404_068, 4788)
			// Standard Error: 119_191
			.saturating_add(Weight::from_parts(16_393_891, 0).saturating_mul(c.into()))
			.saturating_add(T::DbWeight::get().reads(2))
			.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(c.into())))
			.saturating_add(Weight::from_parts(0, 5029).saturating_mul(c.into()))
	}
	// Storage: `Tokens::Accounts` (r:2 w:2)
	// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(147), added: 2622, mode: `MaxEncodedLen`)
	// Storage: `EvmAccounts::EvmAddresses` (r:1 w:0)
	// Proof: `EvmAccounts::EvmAddresses` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`)
	// Storage: `System::Account` (r:1 w:1)
	// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
	// Storage: `Rewards::PoolInfos` (r:1 w:1)
	// Proof: `Rewards::PoolInfos` (`max_values`: None, `max_size`: None, mode: `Measured`)
	// Storage: `Rewards::SharesAndWithdrawnRewards` (r:1 w:1)
	// Proof: `Rewards::SharesAndWithdrawnRewards` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn deposit_dex_share() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `1873`
		//  Estimated: `6234`
		// Minimum execution time: 53_114 nanoseconds.
		Weight::from_parts(54_442_000, 6234)
			.saturating_add(T::DbWeight::get().reads(6))
			.saturating_add(T::DbWeight::get().writes(5))
	}
	// Storage: `Rewards::SharesAndWithdrawnRewards` (r:1 w:1)
	// Proof: `Rewards::SharesAndWithdrawnRewards` (`max_values`: None, `max_size`: None, mode: `Measured`)
	// Storage: `Tokens::Accounts` (r:2 w:2)
	// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(147), added: 2622, mode: `MaxEncodedLen`)
	// Storage: `System::Account` (r:1 w:0)
	// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
	// Storage: `Rewards::PoolInfos` (r:1 w:1)
	// Proof: `Rewards::PoolInfos` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn withdraw_dex_share() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `1880`
		//  Estimated: `6234`
		// Minimum execution time: 54_824 nanoseconds.
		Weight::from_parts(55_922_000, 6234)
			.saturating_add(T::DbWeight::get().reads(5))
			.saturating_add(T::DbWeight::get().writes(4))
	}
	// Storage: `Rewards::SharesAndWithdrawnRewards` (r:1 w:1)
	// Proof: `Rewards::SharesAndWithdrawnRewards` (`max_values`: None, `max_size`: None, mode: `Measured`)
	// Storage: `Rewards::PoolInfos` (r:1 w:1)
	// Proof: `Rewards::PoolInfos` (`max_values`: None, `max_size`: None, mode: `Measured`)
	// Storage: `Incentives::PendingMultiRewards` (r:1 w:1)
	// Proof: `Incentives::PendingMultiRewards` (`max_values`: None, `max_size`: None, mode: `Measured`)
	// Storage: `Incentives::ClaimRewardDeductionRates` (r:1 w:0)
	// Proof: `Incentives::ClaimRewardDeductionRates` (`max_values`: None, `max_size`: None, mode: `Measured`)
	// Storage: `Incentives::ClaimRewardDeductionCurrency` (r:1 w:0)
	// Proof: `Incentives::ClaimRewardDeductionCurrency` (`max_values`: None, `max_size`: None, mode: `Measured`)
	// Storage: `System::Account` (r:1 w:1)
	// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
	// Storage: `EvmAccounts::EvmAddresses` (r:1 w:0)
	// Proof: `EvmAccounts::EvmAddresses` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`)
	fn claim_rewards() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `1925`
		//  Estimated: `5390`
		// Minimum execution time: 82_338 nanoseconds.
		Weight::from_parts(84_160_000, 5390)
			.saturating_add(T::DbWeight::get().reads(7))
			.saturating_add(T::DbWeight::get().writes(4))
	}
	// Storage: `Incentives::IncentiveRewardAmounts` (r:4 w:4)
	// Proof: `Incentives::IncentiveRewardAmounts` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// The range of component `c` is `[0, 4]`.
	fn update_incentive_rewards(c: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `759 + c * (93 ±0)`
		//  Estimated: `2029 + c * (2475 ±0)`
		// Minimum execution time: 4_107 nanoseconds.
		Weight::from_parts(6_747_378, 2029)
			// Standard Error: 84_068
			.saturating_add(Weight::from_parts(6_365_252, 0).saturating_mul(c.into()))
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
			.saturating_add(Weight::from_parts(0, 2475).saturating_mul(c.into()))
	}
	// Storage: `Incentives::ClaimRewardDeductionRates` (r:4 w:4)
	// Proof: `Incentives::ClaimRewardDeductionRates` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// The range of component `c` is `[0, 4]`.
	fn update_claim_reward_deduction_rates(c: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `676 + c * (10 ±0)`
		//  Estimated: `1698 + c * (2475 ±0)`
		// Minimum execution time: 4_097 nanoseconds.
		Weight::from_parts(4_885_406, 1698)
			// Standard Error: 17_876
			.saturating_add(Weight::from_parts(1_882_029, 0).saturating_mul(c.into()))
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
			.saturating_add(Weight::from_parts(0, 2475).saturating_mul(c.into()))
	}
	// Storage: `Incentives::ClaimRewardDeductionCurrency` (r:1 w:1)
	// Proof: `Incentives::ClaimRewardDeductionCurrency` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn update_claim_reward_deduction_currency() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `1039`
		//  Estimated: `4504`
		// Minimum execution time: 14_806 nanoseconds.
		Weight::from_parts(15_373_000, 4504)
			.saturating_add(T::DbWeight::get().reads(1))
			.saturating_add(T::DbWeight::get().writes(1))
	}
}
